﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Text;

namespace MobileManager.UserControl
{
    public partial class RTMenu : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                StringBuilder sbHTML = new StringBuilder(500);
                string strRequst = Request.Url.ToString().ToLower();
                sbHTML.Append("<table id=\"TBmenu\">");
                sbHTML.Append(string.Format("<tr><td><a href=\"RTsimnew.aspx\" class=\"{0}\" target=\"_self\">SIM新增率</a></td></tr>", GetClassName(strRequst, "RTsimnew")));
                sbHTML.Append(string.Format("<tr><td><a href=\"RTsimall.aspx\" class=\"{0}\" target=\"_self\">SIM统计量</a></td></tr>", GetClassName(strRequst, "RTsimall")));
                sbHTML.Append(string.Format("<tr><td><a href=\"RTByCN.aspx\" class=\"{0}\" target=\"_self\">联网成功率</a></td></tr>", GetClassName(strRequst, "RTByCN")));
                sbHTML.Append(string.Format("<tr><td><a href=\"RTdeduct.aspx\" class=\"{0}\" target=\"_self\">下行成功率</a></td></tr>", GetClassName(strRequst, "RTdeduct")));
                sbHTML.Append("</table>");
                divMenu.InnerHtml = sbHTML.ToString();
            }
        }
        private string GetClassName(string strRequst, string strPage)
        {
            if (strRequst.Contains(strPage.ToLower()))
                return "Aselected";
            else return "Anormal";
        }
    }
}